package com.tvein.sanguo.controller.Game.user
{
	//flash
	//pureMVC
	import org.puremvc.as3.multicore.interfaces.ICommand;
	import org.puremvc.as3.multicore.interfaces.INotification;
	import org.puremvc.as3.multicore.utilities.fabrication.patterns.command.SimpleFabricationCommand;
	//custom
	import com.tvein.sanguo.common.CommonConstants;
//
	public class RoleRoomPass extends SimpleFabricationCommand implements ICommand
	{		
		override public function execute(notification:INotification) : void
		{
			switch (notification.getBody()[1][1]) 
			{
				case "in":
					routeNotification(CommonConstants.MODULE_INVOKE, ["-join", notification.getBody()[1][0]], null, CommonConstants.MODULE_CROWD + "/*");
					break;
				case "out":
					routeNotification(CommonConstants.MODULE_INVOKE, ["-leave", notification.getBody()[1][0]], null, CommonConstants.MODULE_CROWD + "/*");
					break;
			}
			
		}
	}
}